package cn.lang.manager;

import cn.lang.service.HolidayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author Lang 1102076808@qq.com
 * @description 定时调度
 * @date 2020-10-30 22:49
 */
@Configuration
@EnableScheduling
public class ScheduleManager {

	@Autowired
	private HolidayService holidayService;

	@Autowired
	private MailManager mailManager;

	@Scheduled(cron = "0 0 8 * * ?")
	private void configureTasks() {
		holidayService.holidayApp();
		mailManager.sendMail("八点发邮件测试","111","1102076808@qq.com");
	}
}
